/*
 * StopTask.java
 * 
 * last update: 16.01.2010 by Stefan Saru
 * 
 * author:	Alec(panovici@elcom.pub.ro)
 * 
 * Obs:
 */

package engine;

@SuppressWarnings("serial")
class StopTask extends FinishTask{

  int code;
  
  public StopTask(NameSpace ns, int delaybefore,
                    InstructionDescription desc, int code,
                    DefaultInstruction next){
    super(ns, delaybefore, desc, code, next);
  }
  
  public void execute()
    throws InterpretTimeException, SimulationStoppedException
  {
    waitToRun();
    xConsole.trace(super.toString());
    xConsole.cout("stopping simulation");
    xConsole.setRunMode(xConsole.COM_STEP);
  }

}



